home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Megarom
/
Megarom Macintosh CD Software (Quantum Leap)(1992).iso
/
COMMUNICATION
/
BBS Software Systems
/
Hermes ƒ
/
HEI 1.0.7
/
HermHeaders.p
next >
Wrap
Text File
|
1991-01-13
|
21KB
|
583 lines
unit HermHeaders;
interface
const
ACTIVEEXT = 1;{values for message field to user external}
IDLE = 2;
CLOSENODE = 3;
CLOSEEXTERNAL = 4;
type
{following is found in the BBsy resource in the }
{Hermes Shared file.}
SecLevRec = record
UseDayorCall: boolean; {minutes per day is true, min/call is false}
ReadAnon: boolean;
TimeAllowed: integer;
MesgDay: integer;
DLRatioOneTo: integer;
PostRatioOneTo: integer;
CallsPrDay: integer;
LnsMessage: integer;
end;
SystHand = ^SystPtr;
SystPtr = ^SystRec;
SystRec = record
OverridePass: string[9];
NewUserPass: string[9];
NumCalls: longint;
NumUsers: integer;
OpStartHour: longint;
OpEndHour: longint;
Closed: boolean;
NewFrmAccess: packed array[1..10] of boolean;
Unused: packed array[1..7] of boolean;
NewSL: integer;
NewDSL: integer;
LastMaint: DateTimeRec;
AnonyUser: integer;
AnonyAuto: boolean;
SerialNumber: string[40];
SecLevels: array[1..255] of SecLevRec;
MsgsPath: str255;
MustRead: boolean;
callsToday: integer;
mPostedToday: integer;
eMailToday: integer;
uploadsToday: integer;
minsToday: integer;
MessComp: real;
XferComp: real;
qScanPointer: longint;
TwoWayChat: boolean;
UseXWind: boolean;
ColorLogs: boolean;
AllowHandles: boolean;
FreePhone: boolean;
ClosedTransfers: boolean;
ProtocolTime: integer;
DefaFore: integer; {mapped to old style quickdraw 8-colors}
DefaBack: integer; {same as above}
twoColorChat: boolean;
TabbyNet: boolean;
SubLaunchTabby: boolean;
NewStrics: packed array[1..26] of boolean;
Reserved: packed array[1..92] of char;
end;
{following is the MesD resource for Directory data}
DirInfoRec = record
DirName: string[41];
Path: str255;
MinDSL: byte;
DSLtoUL: byte;
MaxFiles: integer;
Restriction: char;
NetID: integer;
mode: byte; { -1 = Never New, 0=Normal , 1= Always New }
MinAge: byte;
FileNameLength: byte;
end;
dirDataPtr = ^dirDataFile;
DirDataFile = record
numDirs: byte;
Dr: array[0..63] of DirInfoRec;
end;
{following is the MesD resource in the Shared file for Message sections}
SubBoardRec = record
Name: string[41];
SLtoRead: integer;
SLtoPost: integer;
MaxMessages: integer;
AnonID: byte; {0=never, 1=force, -1=allow}
MinAge: integer;
SubType: integer;
StoreType: boolean;{true is one file, false multiple}
restrict: char;
Threading: boolean;
EchoConf: boolean;
Excess: packed array[1..7] of char;
end;
MDescPtr = ^MDescRec;
MDescRec = record
numForums: integer;
Forums: array[1..10] of string[41];
numBoards: array[1..10] of integer;
Boards: array[1..10, 1..30] of SubBoardRec;
end;
{following is the struct for MesD ID=2 for GFile section data}
GFileSec = record
SecName: string[50];
minSL: integer;
minAge: integer;
reserved: packed array[1..15] of char;
end;
GFileSecPtr = ^GFileSecRec;
GFileSecRec = record
numSecs: integer;
Sections: array[1..30] of GfileSec;
end;
{following is the record passed to type 1 Hermes externals}
HermDataPtr = ^HermDataRec;
HermDataRec = record
HSystPtr: SystPtr;
HMDescPtr: MDescPtr;
HDirDataPtr: dirDataPtr;
HGFilePtr: GFileSecPtr;
SharedPath: StringPtr;
reserved2: longint;
reserved3: longint;
end;
{following is the User record stored consecutively in the DATA fork of the}
{Hermes Shared file.}
UserRec = record
UserNum: integer;
UserName: string[31];
RealName: string[21];
Phone: string[12];
Password: string[9];
lastOn: longInt;
firstOn: longInt;
SysopNote: string[41];
sex: boolean; {male is 1, female is 0}
age: byte;
Deleting: boolean;
ComputerType: byte;
DefaultProtocol: byte;
SecLevel: Integer;
TransferLevel: integer;
MsgFrmAccess: packed array[1..10] of boolean;
Restrics: packed array[1..26] of boolean;
Mailbox: boolean; {false is normal, true is forwarded}
ForwardedTo: integer;
onToday: integer;
MinOnToday: integer;
MessagesPosted: integer;
MPostedToday: integer;
EMailSent: integer;
EMsentToday: integer;
NumUploaded: integer;
NumDownloaded: integer;
UploadedK: longint;
DownloadedK: longint;
LastBaud: integer;
LastVoted: longint;
ScrnWdth: integer;
ScrnHght: integer;
CanANSI: boolean;
ANSIColor: boolean;
Foregrounds: packed array[0..8] of byte;
Backgrounds: packed array[0..8] of byte;
Bolds: packed array[0..8] of boolean;
Underlines: packed array[0..8] of boolean;
PauseScreen: boolean;
TotalLogons: integer;
totalTimeOn: longint;
illegalLogons: integer;
WhatNScan: packed array[1..10, 1..30] of boolean;
LastMsgs: array[1..10, 1..30] of longint;
Expert: boolean;
BirthDay: char;
BirthMonth: char;
BirthYear: char;
lastFileScan: longInt;
NTransAfterMess: boolean;
votes: packed array[1..19] of byte;
ExtendedLines: byte;
screenClears: boolean;
coSysop: boolean;
alertOn: boolean;
reserved: packed array[1..47] of char;
end;
BDact = (ListText, Prompt, None, Chat, Writing, Repeating);
aLine = packed array[1..80] of char;
FidoAddress = record
name: string[81];
atNode: string[15];
end;
MessgHand = ^MessgPtr;
MessgPtr = ^HermesMesg;
HermesMesg = array[1..300] of string[161];
ScrnKeysHnd = ^ScrnKeysPtr;
ScrnKeysPtr = ^ScrnKeys;
ScrnKeys = array[0..1000] of aLine;
PtrToLong = ^longint;
PtrToWord = ^integer;
indxHand = ^indxPtr;
indxPtr = ^indxRec;
indxRec = array[0..2047] of integer;
MesgRec = record
Title: string[80];
AnonyID: byte; {for now, 0=no anony and 1=anony}
Deletable: boolean;
ownerSystem: integer;
ownerUser: integer;
QScnPtr: longint;
daten: longint;
storedAs: longint;
StorageType: boolean; {true is one file, false is lots of files}
end;
SubDynamicRec = array[0..90000] of MesgRec;
SubDyPtr = ^SubDynamicRec;
SubDyHand = ^SubDyPtr;
FilEntryRec = record
flName: string[20]; {list file name}
realFName: string[31]; {real file name on desktop}
flDesc: string[59]; {file description}
whenUL: longInt; {exact time uploaded in Mac date format from Jan 1, 1904}
UploaderName: string[41]; {user name of uploader}
UploaderNum: integer; {user number of uploader}
UploaderSys: integer; {set to zero for now. Intended for WWIVnet compatibility.}
numDLoads: integer; {how many times this has been dl'd}
ByteLen: longInt; {length of file in bytes}
HasExtended: boolean; {boolean}
FileStat: char;
lastDL: longint;
Reserved: packed array[1..4] of char; {set to nulls for now}
end;
aDirHand = ^aDirPtr;
aDirPtr = ^aDirFile;
aDirFile = array[0..90000] of filentryrec;
emailrec = record
title: string[80];
Anony: boolean;
FromSys: integer;
FromUser: integer;
ToSys: integer;
ToUser: integer;
DateSent: longint;
StoredAs: longint;
MType: byte; {1=normal, 0=he read message}
multiMail: boolean;
end;
MesgHand = ^MesgPtr;
MesgPtr = ^EMDynamicRec;
EMDynamicRec = array[0..80000] of EMailRec;
PathsFilesRec = record
fName: StringHandle;
mbName: stringHandle;
myvRef: integer;
myDirID: longint;
myFileID: longint;
end;
XFERStuffHand = ^XFERStufPtr;
XFERStufPtr = ^XFERStuff;
XFERstuff = packed record
modemInput: integer;
modemOutput: integer;
procID: integer;
protocolData: handle;
errorReason: stringHandle;
timeOut: integer;
fileCount: integer;
filesDone: integer;
curBytesDone: longint;
curBytesTotal: longint;
curStartTime: longint;
flags: packed array[0..15] of boolean;
fPaths: packed array[1..1] of pathsFilesRec;
end;
ProcList = record
procID: integer;
itemID: integer;
HMenuID: integer;
HItemID: integer;
subName: stringHandle;
pFlags: integer;
funcMask: integer;
refCon: longint;
end;
ProcMenuHandle = ^ProcMenuPtr;
ProcMenuPtr = ^ProcMenu;
ProcMenu = record
mode: integer;
pMenu: MenuHandle;
Updater: ProcPtr;
transIndex: integer;
transMessage: integer;
transRefCon: longint;
Proto: XFERStuffHand;
pCount: integer;
firstID: integer;
foldID: integer;
autoCount: integer;
autoComs: handle;
theProcList: array[0..5] of ProcList;
end;
BatFileRec = record
FullPath: str255; {full HFS pathname with filename on end}
DoneTransfer: boolean; {set this when file has been transferred}
Recorded: boolean; {used internally, do NOT modify}
ListName: string[21]; {file listing name,used internally}
FromDir: integer; {transfer directory for file}
ByteLen: longint; {byte length of file, used internally}
MBName: string[31];
end;
FLSHand = ^FLSPtr;
FLSPtr = ^FLSRec;
FLSRec = record
NumFiles: integer; {max batch is 50 arbitrarily}
BatchTime: longint; {used internally, approximation of transfer time(seconds)}
BatchKBytes: longint; {used internally}
FilesGoing: array[1..50] of BatFileRec;
end;
TextHand = ^TextPtr;
TextPtr = ^TextRec;
TextRec = packed array[0..92000] of char;
ConOne = record
BaudID: string[15];
BaudConstant: integer;
ConnectNote: string[15];
end;
ConHand = ^ConPtr;
ConPtr = ^ConRec;
ConRec = array[1..2000] of conOne;
InternalTransfer = record
active: boolean;
Sending: boolean;
starttime: longint;
end;
ExtDescRec = record
fName: string[20];
DescLeng: integer;
end;
ULR = record {this is stored in the HermUsers array in the UserXIPtr}
Uname: string[31];
Dltd: boolean;
last: longint;
real: string[21];
end;
UListHand = ^UListPtr;
UListPtr = ^UListRec;
UListRec = array[0..32000] of ULR;
CarDetType = (CTS5, DCDchip, DCDdriver);
HermesPrompt = record
promptLine: string[80]; {actual prompt text line}
allowedChars: string[100]; {all other characters ignored, set to zero for full acceptance of everything}
replaceChar: char; {replace all input with this character for output, i.e. Password entry, set null for nothing}
Capitalize: boolean; {capitalize all incoming characters}
enforceNumeric: boolean; {are numbers accepted? overrides allowedChars string}
autoAccept: boolean; {automatically accept on numeric/character input deemed complete}
wrapAround: boolean; {at end of prompt, wrap text to next line using excess string in defs}
wrapsonCR: boolean;
breakChar: char; {this key will override autoAccept and go to the next input}
HermesColor: integer; {on Hermes ANSI from 0-7...sets color on output, -1 is no ANSI}
InputColor: integer; {same as above except for user input}
numericLow: integer; {if enforceNumeric, low range}
numericHigh: integer; {if enforceNumeric, high range}
maxChars: integer; {maximum accepted number of characters}
KeyString1: string[10]; {on key input, character 1 of this being received will output rest of string}
KeyString2: string[10]; {see above}
KeyString3: string[10];
end;
eInfoHand = ^eInfoPtr;
eInfoPtr = ^eInfoRec;
eInfoRec = record
allTime: boolean; {to be called all the time or only for user menu invokes.}
minSLforMenu: integer;
Restriction: char;
end;
HermUserGlobHand = ^HermUserGlobPtr;
HermUserGlobPtr = ^HermUserGlobs;
HermUserGlobs = record
rawBuffer: packed array[0..4096] of char; { used by the DRIVER - DON'T touch it }
incoming: packed array[0..4096] of char; {don't touch this either}
myPrompt: HermesPrompt;
toBeSent, protCodeHand: Handle;
sendingNow: ptr;
sysopLogOn, Prompting, stopRemote, retob, inTransfer, inHalfDuplex, readMsgs, continuous, inZScan, inNScan, fromQScan, endQScan, newFeed, timeFlagged, Single, DoCheckMessage, InPause, allDirSearch, aborted, in8BitTerm, ANSIterm: boolean;
callFMail, chatKeySysop, sentAnon, batchTrans, wrapPrompt, promptHide, sysopStop, triedChat, threadmode, reply, writeOut: boolean;
gettingANSI, HWHH, dirUpload, goOffinLocal, shutdownsoon, wasMadeTempSysop, negateBCR, tabbyPaused: boolean;
inScroll, countingDown, netMail, blinkOn, useDTR, capturing, amSpying, loggedIn, doCrashmail: boolean;
matchInterface, useWorkspace, drawingCurs, descSearch, outputting, ListedOneFile, returnafterprompt, afterHangup, listingHelp: boolean;
curWriting, sysopKeyBuffer: charsHandle;
curExtDesc: extDescRec;
screenKeys: ScrnKeysHnd;
fileTransit: FLSHand;
myBlocker: paramBlockRec;
replyStr, modemInit, modemHangup, termInit, ansInProgress, curPrompt, mDriverName, enteredPass: str255;
curBaudNote, actionString, enteredPass2, typeBuffer, autoMess, doingPrompt, fileMask, excess: str255;
inportName, outportname, replyToStr, lastTransError, SavedInPort, lastBotLine: str255;
q, openTextSize, lastKeyPressed, startedChat, lastTry, lastFTUpdate: longint;
currentBaud, lastLastPressed, lastCurBytes, crossLong, curTextPos, subtractOn: longInt;
lastBlink, TimeBegin, ExtraTime, Uptime, Downtime, LASTLEFT, timeout, startCPS: longint;
whPort, headMessage, lnsPause, inputRef, outputRef, frontCharElim, OpenTextRef, MaxPromptChars, atMail, EndAnony, totalEMails, onBatchNumber: integer;
TextHnd: TextHand;
cursorPos, saveCursor, savecursorRem, anchor, EndSel: point;
lastCursorRect: rect;
Connects: ConHand;
numDifConnect, MaxBaud, MinBaud, inMessage, mesRead, maxLines, onLine, savedLine, configForum, inForum, inSub, numRptPrompt, realSL, inDir, tempDir, flsListed, fListedCurDir, curDirPos, tempInDir, crossInt, crossInt2, crossInt3, dirOpenNum, curNumFiles, curFore, curBack, curFont, numEMails, saveInForum, saveInSub, helpNum: integer;
captureRef, curNumMess, activeProtocol, lastBatch: integer;
thisUser, tempUser, MailingUser: UserRec;
curEMailRec: EMailRec;
CarrierDetect: CarDetType;
curStyle: style;
curmessage: MessgHand;
lastFScan: longInt;
ourMail: MesgHand;
curMesgRec: MesgRec;
extTrans: XFERstuffHand;
myTrans: internalTransfer;
curBase: subDyHand;
TransDilg: dialogPtr;
curFil: FilEntryRec;
curOpenDir: aDirHand;
blinkRgn: rgnhandle;
curIndex: indxHand;
myFido: FidoAddress;
multiUsers: array[1..20] of integer;
numMultiUsers, spying: integer;
scrollStart: integer;
bottomNum, numBufLins: integer;
myProcMenu: ProcMenuHandle;
activeUserExternal: integer; {if >0 then external will be called}
BoardMode: (Waiting, Terminal, User, Answering, Failed);
BoardSection: (Logon, NewUser, MainMenu, rmv, MoveFiles, killMail, AutoVal, Batch, MultiChat, tranDef, MultiMail, Noder, messUp, renFiles, readAll, RmvFiles, GFiles, UEdit, USList, BBSlist, chUser, limdate, Download, Sort, Upload, OffStage, ListFiles, post, ChatStage, Defaults, Email, QScan, ReadMail, Amsg, Transfers, Ext, EXTERNAL);
boardAction, savedBDaction, savedBD2: BDact;
ValDo: (Val1, Val2);
AutoDo: (AutoOne, AutoTwo, AutoThree, AutoFour, AutoFive, AutoSix, AutoSeven);
ReadDo: (ReadOne, ReadTwo, ReadThree, ReadFour, ReadFive, ReadSix, ReadSeven, ReadEight, JumpForum);
EmailDo: (WhichUser, EmailOne, EmailTwo, EmailThree, EmailFour);
MultiDo: (MultiOne, MultiTwo, MultiThree, MultiFour);
MultiChatDo: (Mult1, Mult2);
BatDo: (BatOne, BatTwo, BatThree, BatFour, BatFive, BatSix, BatSeven);
KillDo: (KillOne, KillTwo, KillThree, KillFour, KillFive);
TransDo: (TrOne, TrTwo, TrThree, TrFour);
bbsLdo: (Bone, BTwo, BThree, BFour, BFive, bSix, bSeven);
upMess: (MessUpOne, MessUpTwo, MessUpThree);
AllDo: (AllOne, AllTwo, AllThree);
GFileDo: (G1, G2, G3, G4, G5, G6);
ExtenDo: (ex1, ex2, ex3, EX4);
DownDo: (DownOne, DownTwo, DownThree, DownFour, DownFive);
RenDo: (RenOne, RenTwo, RenThree, RenFour, RenFive, RenSix, RenSeven, RenEight);
SortDo: (SortOne, SortTwo, SortThree);
RFDo: (RFOne, RFTwo, RFThree, RFFour, RFFive, RFSix, RFSeven, RFEight);
ChatDo: (ChatOne, ChatTwo, ChatThree);
NodeDo: (NodeOne, NodeTwo, NodeThree, NodeFour, NodeFive, NodeSix);
PostDo: (PostOne, PostTwo, PostThree, PostFour);
UploadDo: (UpOne, UpTwo, UpThree, UpFour, UpFive, UpSix, UpSeven, UpEight);
ListDo: (ListOne, ListTwo, ListThree, ListFour, ListFive, ListSix, ListSeven);
QDo: (Qone, QTwo, QThree, QFour, QFive, QSix, QMove, QMove2);
UEdo: (UOne, UTwo, UThree, UFour, UFive, USix, USeven, UEight, UNine, UTen, UEleven, UTwelve, U13, U14, U15, U16, U17, U18);
rmvDo: (RmvOne, RmvTwo);
DefaultDo: (DefaultOne, DefaultTwo, DefaultThree, DefaultFour, DefaultFive, DefaultSix, DefaultSeven, DefaultEight, DefaultNine, DefaultTen, DefaultEleven, DefaultTwelve, DefaultThrt, def14, def15, def16, def17, D18, D19, D20, D21, D22, D24, D23);
MainStage: (MenuText, MainPrompt, TextForce);
NewUserStage: (NoNewText, NewUserPass, CheckNewPass, PromptHandle, CheckTrash, RealName, NewPhone, Sex, BirtMonth, BirtDay, BirtYear, ComputerType, ScrnWd, ScrnHg, TestANSI, checkColor, IsAllCorrect, PassQuest, NewPassword, GiveInfo, ConfirmPass, NewTransition, TwoTrans);
LogonStage: (Welcome, Name, CheckName, Password, Phone, SysPass, ChkSysPass, CheckStuff, Hello, Stats, StatAuto, Transition, Trans2);
OffDo: (SureQuest, OffText, Hanger);
MoveDo: (moveOne, MoveTwo, MoveThree, MoveFour, MoveFive, MoveSix);
ExternalDo: (external1, external2, theExternal);
end;
myPrivsHand = ^myPrivsPtr;
myPrivsPtr = ^myPrivs;
myPrivs = record
activeOn: array[1..10] of boolean;
stage: array[1..10] of integer;
end;
UserXIPtr = ^UserXInfoRec;
UserXInfoRec = record
privates: myPrivsHand;
extID: integer;
totalNodes: integer;
message: integer;
curNode: PtrToWord;
curUGlobs: PtrToLong;
ResShared: integer;
DataShared: integer;
HSystPtr: SystPtr;
HMDescPtr: MDescPtr;
HDirDataPtr: dirDataPtr;
HGFilePtr: GFileSecPtr;
filesPath: StringPtr;
HermUsers: UListHand;
n: array[1..10] of HermUserGlobPtr;
procs: array[0..0] of procPtr;
end;
procedure bCR (theRout: ProcPtr); {selector = 0}
inline
$205f, $4e90;
procedure OutLine (goingOut: str255; NLatBegin: boolean; typeLine: integer; theRout: ProcPtr); {selector=1}
inline
$205f, $4e90;
procedure HangUpAndReset (theRout: ProcPtr); {selector = 2}
inline
$205f, $4e90;
procedure PromptUser (whichNode: integer; theRout: ProcPtr); {selector = 3}
inline
$205f, $4e90;
procedure LettersPrompt (prompt, accepted: str255; sizeLimit: integer; auto, wrap, capital: boolean; replace: char; theRout: ProcPtr); {selector=4}
inline
$205f, $4e90;
procedure NumbersPrompt (prompt, accepted: STR255; high, low: integer; theRout: ProcPtr); {selector=5}
inline
$205f, $4e90;
procedure YesNoQuestion (prompt: STR255; yesIsDefault: boolean; theRout: ProcPtr); {selector=6}
inline
$205f, $4e90;
procedure GoHome (theRout: procPtr); {selector=7}
inline
$205f, $4e90;
procedure BackSpace (howMany: integer; theRout: procPtr); {selector=8}
inline
$205f, $4e90;
procedure ANSIPrompter (numChars: integer; theRout: ProcPtr); {selector=9}
inline
$205f, $4e90;
function ReadTextFile (fileName: str255; storedAs: integer; insertPath: boolean; theRout: ProcPtr): boolean; {selector=10}
inline
$205f, $4e90;
procedure RePrintPrompt (theRout: ProcPtr); {selector=11}
inline
$205f, $4e90;
procedure OutChr (theChar: char; theRout: ProcPtr); {selector=12}
inline
$205f, $4e90;
procedure ANSICode (theCode: str255; theRout: ProcPtr); {selector=13}
inline
$205f, $4e90;
procedure PAUSEPrompt (prompt: str255; theRout: ProcPtr); {selector=14}
inline
$205f, $4e90;
function FindUser (SearchString: str255; var UserFound: UserRec; theRout: ProcPtr): boolean; {selector=15}
inline
$205f, $4e90;
implementation
end.